import antlr3
from simple_pyexpressionLexer import simple_pyexpressionLexer
from simple_pyexpressionParser import simple_pyexpressionParser
import sys

input = "3+(1+2)*4"
stream = antlr3.ANTLRInputStream(sys.stdin)

lexer = simple_pyexpressionLexer(stream)
tokens = antlr3.CommonTokenStream(lexer)
parser = simple_pyexpressionParser(tokens)
parser.prog()
